SpatialStream® Code Examples

Simple Mouse Over Identify

This example shows how to add mouse-over identify capability to the parcel layer in your application using
the GetByGeometry functional component. When the mouse cursor is 'paused' on the map for one second,
an "On Mouse Pause" event is triggered and a GetByGeometry query constructed using the latitude longitude
values at the mouse pause location. The returned result includes the geometry of the parcel at the mouse
pause location which is used to highlight the geometry on the map.

GetByGeometry

timer = setTimeout(function(){
var sourceUrl = "http://dc1.spatialstream.com/getByGeometry.aspx?returnGeoType=1&dataSource=SampleSite.DMP/Parcels"
+"&output=geojson&Geo=POINT("
+ e.latlng.lng + " " + e.latlng.lat + ")";
Dmp.Env.Connections["SS"].getJson(sourceUrl, successCallback, errorCallback);
},pauseTime);


Run Sample   Back To Index